package lib.self.bean;

import java.util.List;

import lib.self.adapter.interfaces.ITreeBean;

/**
 * description:二级列表数据实体类
 * author: Steven Xiao
 * date 2018/8/21
 */
public abstract class TreeBean<C extends TreeChildBean> extends BeanEx implements ITreeBean<C> {
    private int parentPosition;//一级数组位置
    private int childPosition;//二级数组位置

    @Override
    public int getParentPosition() {
        return parentPosition;
    }

    @Override
    public void setParentPosition(int parentPosition) {
        this.parentPosition = parentPosition;
    }

    @Override
    public int getChildPosition() {
        return childPosition;
    }

    @Override
    public void setChildPosition(int childPosition) {
        this.childPosition = childPosition;
    }

    @Override
    public abstract List<C> getChildren();//null即为子Bean

    @Override
    public boolean isParentItem() {
        return true;
    }
}
